Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement the operations API #20

Merged
merged 8 commits into from
Apr 19, 2021
Merged

implement the operations API #20

merged 8 commits into from
Apr 19, 2021

Conversation

the-mikedavis
Copy link
Collaborator

@the-mikedavis the-mikedavis commented Apr 19, 2021

connects #7

there's some cool stuff in here we can do especially with scavenges like controlling the thread count dedicated to performing the scavenge

also the scavenge workflow is asynchronous, so you can do something like

iex> {:ok, scavenge} = Spear.start_scavenge(conn)
iex> {:ok, sub} = Spear.subscribe(conn, self(), Spear.scavenge_stream(scavenge))
iex> receive do
...>   %Spear.Event{type: "$scavengeCompleted"} -> :done
...> after
...>   60_000 -> :timeout
...> end
:done
iex> Spear.cancel_subscription(conn, sub)
:ok

to await the scavenge completion

other stuff doesn't seem to have any utility yet like node resignation or priorities. those will probably come into play when we do some clustering & gossip

one of the operations (not scavenging) was making appends timeout
reliably. If I had to guess I'd say it's the ResignNode or maybe the
SetNodePriority

those don't really have great test cases anyways so I'm ignoring
them for the stability of the rest of the suite
@the-mikedavis the-mikedavis self-assigned this Apr 19, 2021
@the-mikedavis the-mikedavis requested a review from a team April 19, 2021 18:20
@the-mikedavis the-mikedavis merged commit 74b8526 into main Apr 19, 2021
@the-mikedavis the-mikedavis deleted the operations-api branch April 19, 2021 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant